<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<aside class="main-sidebar">
	<section class="sidebar">
		<div class="user-panel">
			<div class="pull-left image">
				<img src="${_userInfo_.headImg }" style="width:45px;height: 45px;" class="img-circle" alt="User Image">
			</div>
			<div class="pull-left info">
				<p>${_userInfo_.userName }</p>
				<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
			</div>
		</div>
		<ul class="sidebar-menu">
			<li class="header">ASONE-MANAGE</li>
			<c:forEach var="sourceTree" items="${_userResource_.sourceTree}">
				<li class="treeview">
					<!-- 一级菜单 -->
					<c:if test="${sourceTree.resourceType==0}">
						<a href="#">
							<i class="fa ${sourceTree.iconClass}"></i> 
							<span>${sourceTree.resourceName}</span> 
							<i class="fa fa-angle-left pull-right"></i>
						</a>
					</c:if>
					<c:if test="${sourceTree.resourceType==1}">
						<a href="${sourceTree.url}">
							<i class="fa ${sourceTree.iconClass}"></i> 
							<span>${sourceTree.resourceName}</span> 
							<i class="fa fa-angle-left pull-right"></i>
						</a>
					</c:if>
					<!-- 二级菜单 -->
					<c:if test="${not empty sourceTree.resourceChild}">
						<ul class="treeview-menu">
							<c:forEach var="resourceChild" items="${sourceTree.resourceChild}">
								<c:if test="${resourceChild.resourceType==0}">
									<li>
										<a href="#">
											<i class="fa ${resourceChild.iconClass}"></i> 
											<span>${resourceChild.resourceName}</span> 
											<i class="fa fa-angle-left pull-right"></i>
										</a>
										<c:if test="${not empty resourceChild.resourceChild}">
											<ul class="treeview-menu">
												<c:forEach var="resourceThread" items="${resourceChild.resourceChild}">
													<c:if test="${resourceThread.resourceType==1}">
														<c:if test="${resourceThread.resourceName==_userResource_.head.resourceName}">
															<li id="resourceChildActive" class="active">
																<a href="${resourceThread.url}">
																 	<i class="fa ${resourceThread.iconClass}"></i> ${resourceThread.resourceName}
															 	</a>
														 	</li>
														</c:if>
														<c:if test="${resourceThread.resourceName!=_userResource_.head.resourceName}">
															<li>
																<a href="${resourceThread.url}">
																 	<i class="fa ${resourceThread.iconClass}"></i> ${resourceThread.resourceName}
															 	</a>
														 	</li>
												 		</c:if>
													</c:if>
												</c:forEach>
											</ul>
										</c:if>
									</li>
								</c:if>
								<c:if test="${resourceChild.resourceType==1}">
									<c:if test="${resourceChild.resourceName==_userResource_.head.resourceName}">
										<li id="resourceChildActive" class="active">
											<a href="${resourceChild.url}">
											 	<i class="fa ${resourceChild.iconClass}"></i> ${resourceChild.resourceName}
										 	</a>
									 	</li>
							 		</c:if>
							 		<c:if test="${resourceChild.resourceName!=_userResource_.head.resourceName}">
										<li>
											<a href="${resourceChild.url}">
											 	<i class="fa ${resourceChild.iconClass}"></i> ${resourceChild.resourceName}
										 	</a>
									 	</li>
							 		</c:if>
								</c:if>
							</c:forEach>
						</ul>
					</c:if>
				</li>
			</c:forEach>
		</ul>
	</section>
</aside>